feat: Capture and stream process stderr to server log manager - #63
Merged
Conversation
Capture stderr output from stdio MCP server child processes and pipe it into the ServerLogManager so process logs appear in the desktop log viewer alongside connection and tool-call logs. - Use os_pipe to create a pipe pair before spawning the child process - Pass the write end as the child's stderr via the Command configure closure - Spawn a background blocking task that reads stderr line-by-line and appends each line to ServerLogManager with LogSource::Stderr - Add log-level heuristics (classify_stderr_line) for error/warn/debug - Graceful fallback to Stdio::null() if pipe creation fails - Add Rust integration tests for os_pipe stderr capture and ServerLogManager integration - Add e2e desktop test spec for process log visibility in the UI - Logs remain internal to the desktop app (Tauri IPC only, not exposed on the HTTP gateway) https://claude.ai/code/session_01FqgQw173URiGuGzfULZira
This was referenced Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement stderr capture for stdio-based MCP servers, allowing process output to be streamed to the server log manager and displayed in the desktop log viewer. Process stderr is captured via OS pipes and logged with appropriate log levels based on content heuristics.
Key Changes
create_stderr_pipe()to create OS pipes for stderr capture andspawn_stderr_reader()to spawn a background task that reads stderr lines and logs them to the server log managerclassify_stderr_line()to heuristically classify stderr output into appropriate log levels (Error, Warn, Debug, Info) based on keywordsconnect_with_stderr()helper method to support both piped and null stderr configurations with graceful fallbackImplementation Details
tokio::task::spawn_blocking()to avoid blocking async runtimeBufReader::lines()for clean line-by-line processing with automatic EOF handlingStdio::null()instead of failingServerLogManagerTesting
ServerLogManagerwithLogSource::Stderrhttps://claude.ai/code/session_01FqgQw173URiGuGzfULZira